﻿using System;

using DBUtility.PetaPoco;

namespace Model
{
    /// <summary>
    /// 待推送消息
    /// </summary>
    [Serializable]
    [TableName("pendingpushmessage")]
    [PrimaryKey("Id", autoIncrement = true)]
    public partial class Pendingpushmessage
    {
        #region Model
        private int _id;
		private string _messagecontent;
        private string _data;
        private int? _sendcount;
		private DateTime? _createtime;
        private int? _appid;
        #region 关联App
        private string _appname;
        private string _certificate;
        private string _password;
        private string _senderid;
        private string _authorizationtoken;
        private string _packagename;
        #endregion
        #region 关联Device
        private int? _mid;
        private string _devicetoken;
        private bool _status;
        private int _type;
        private int _count;
        private string _devicelist;
        #endregion
        /// <summary>
		/// 
		/// </summary>
		public int Id
		{
		    set { _id = value; }
		    get { return _id; }
		}
		/// <summary>
		/// 推送內容
		/// </summary>
		public string Messagecontent
		{
		    set { _messagecontent = (value == null || value.Length <= 500 ? value : value.Substring(0, 500)); }
		    get { return _messagecontent; }
		}

        public string Data
        {
            set { _data = (value == null || value.Length <= 500 ? value : value.Substring(0, 500)); }
            get { return _data; }
        }

        /// <summary>
        /// 发送数量
        /// </summary>
        public int? SendCount
		{
		    set { _sendcount = value; }
		    get { return _sendcount; }
		}
		/// <summary>
		/// 創建時間
		/// </summary>
		public DateTime? Createtime
		{
		    set { _createtime = value; }
		    get { return _createtime; }
		}
        /// <summary>
		/// 
		/// </summary>
		public int? AppId
        {
            set { _appid = value; }
            get { return _appid; }
        }
        #region ResultColumn
        [ResultColumn]
        public string AppName
        {
            set { _appname = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _appname; }
        }
        [ResultColumn]
        public string Certificate
        {
            set { _certificate = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _certificate; }
        }
        [ResultColumn]
        public string PassWord
        {
            set { _password = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _password; }
        }
        [ResultColumn]
        public string SenderId
        {
            set { _senderid = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _senderid; }
        }
        [ResultColumn]
        public string AuthorizationToken
        {
            set { _authorizationtoken = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _authorizationtoken; }
        }
        [ResultColumn]
        public string PackageName
        {
            set { _packagename = (value == null || value.Length <= 100 ? value : value.Substring(0, 100)); }
            get { return _packagename; }
        }

        [ResultColumn]
        public int? Mid
        {
            set { _mid = value; }
            get { return _mid; }
        }
        [ResultColumn]
        public string Devicetoken
        {
            set { _devicetoken = (value == null || value.Length <= 200 ? value : value.Substring(0, 200)); }
            get { return _devicetoken; }
        }
        [ResultColumn]
        public bool Status
        {
            set { _status = value; }
            get { return _status; }
        }
        [ResultColumn]
        public int Type
        {
            set { _type = value; }
            get { return _type; }
        }
        [ResultColumn]
        public int Count
        {
            set { _count = value; }
            get { return _count; }
        }
        [ResultColumn]
        public string Devicelist
        {
            set { _devicelist = value; }
            get { return _devicelist; }
        }
        #endregion

        #endregion
    }
}